<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			// 正则表达式的两种方式
			//1.实例化方式 -- const regex = new RegExp(规则模式pattern,修饰符flags)
			// 2.字面量方式  -- const regex = /规则模式pattern/修饰符flags

			const regex = /nice to meet you/;
			let string = "nice to meet you";
			console.log(regex.test(string));
		</script>
	</body>
</html>
